from typing import Protocol

from src.domain.order.aggregates.order import OrderAggregate
from src.domain.order.value_objects import OrderId


class OrderRepo(Protocol):
    """
    Репозиторий заказов
    """

    async def acquire_order_by_id(self, order_id: OrderId) -> OrderAggregate:
        """Получаем заказ по id"""
        raise NotImplementedError

    async def update_order(self, order: OrderAggregate) -> None:
        """Обновление данных заказа"""
        raise NotImplementedError

    async def create_order(self, order: OrderAggregate) -> None:
        """Создание заказа"""
        raise NotImplementedError
